-- GENERATED SPELL FOR [Storm Giant] --


function spell0_24812(pUnit, Event) --@Hulking Uppercut,n/a--
pUnit:FullCastSpellOnTarget(50084,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24812', 559, 1)
end

function spell1_24812(pUnit, Event) --@Stormbolt,n/a--
pUnit:FullCastSpellOnTarget(50100,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24812', 3310, 1)
end

function spell2_24812(pUnit, Event) --@Violent Hurricane,n/a--
pUnit:FullCastSpellOnTarget(50105,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24812', 20000, 1)
end

function Sorts_24812(pUnit, Event)
local choix_sorts_24812 = math.random(0, 2)
if choix_sorts_24812 == 0 then
pUnit:RegisterEvent('spell0_24812', 1, 1)
end
if choix_sorts_24812 == 1 then
pUnit:RegisterEvent('spell1_24812', 1, 1)
end
if choix_sorts_24812 == 2 then
pUnit:RegisterEvent('spell2_24812', 1, 1)
end
end

function mob24812_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24812', math.random(1500, 3000), 1)
end

function mob24812_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24812_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24812_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24812, 1, 'mob24812_Action')
RegisterUnitEvent(24812, 2, 'mob24812_Leave')
RegisterUnitEvent(24812, 3, 'mob24812_Kill')
RegisterUnitEvent(24812, 4, 'mob24812_Die')
